﻿
if (!window.SilverlightUtils) window.SilverlightUtils = {};
SilverlightUtils.getInstalledSilverlightVersion = function () {
    var hasSilverlight = Boolean(window.Silverlight);
    var maxSupportedVersion = null;

    if (hasSilverlight) {
        var mv = 7;
        while (mv > 0) {
            var v = mv + ".0";
            if (Silverlight.isInstalled(v)) {
                maxSupportedVersion = v;
                break;
            }
            mv--;
        }
        return maxSupportedVersion;
    } else {
        return null;
    }
}
